<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!--#include file="includes/common.aspx"-->
<!--#include file="includes/includeitems.aspx"-->
<script  runat="server">
Dim strInterest="",itemid="",SQL=""
Dim continue="",file="",fromcart=""
Dim i=0
Sub Page_Load(ByVal sender As Object, _
	ByVal e As EventArgs)	
   If Not Page.IsPostback Then
	file=request.querystring("from_")
	fromcart=Request.Form("fromcart")
	continue="id="&request.querystring("id")
	continue += "&rows="&request.querystring("rows")
	continue += "&pages="&request.querystring("pages")
	continue += "&page="&request.querystring("page")
	continue += "&sort="&request.querystring("sort")
	continue += "&from_="&request.querystring("from_")
	file=request.querystring("from_")
	if file="" then file="search.aspx"		
	if fromcart="1" then
		itemid=request.form("itemids")
		if instr(session("shoppingcarts"),"itemid=" + itemid + "}")=0 then
			session("shoppingcart") +=1						
			session("shoppingcarts") +=  "{" + session("shoppingcart").toString() + "itemid=" + request.form("itemids") + "}{itemname" + session("shoppingcart").toString() + "=" + request.form("itemname" + itemid) + "}{itemprice" + session("shoppingcart").toString() +"=" + request.form("itemprice" + itemid) + "}{itemqtty" + session("shoppingcart").toString() + "=" + request.form("itemqtty" + itemid)   + "}{itemlistprice" + session("shoppingcart").toString() + "=" + request.form("itemlistprice" + itemid)   + "}{itemstyle" + session("shoppingcart").toString() + "=" + request.form("itemstyle" + itemid)   + "}{itemproname" + session("shoppingcart").toString() + "=" + request.form("itemproname" + itemid)   + "}{itemweight" + session("shoppingcart").toString() + "=" + request.form("itemweight" + itemid)  + "}{itemauthorname" + session("shoppingcart").toString() + "=" + request.form("itemauthorname" + itemid)   + "}{itemdiscount" + session("shoppingcart").toString() + "=" + request.form("itemdiscount" + itemid)  + "}{itemavailable" + session("shoppingcart").toString() + "=" + request.form("itemavailable" + itemid)   + "}{itemimage" + session("shoppingcart").toString() + "=" + request.form("Image" + itemid) + "}"
		end if
	else					
		For i=0 To request.form.GetValues("itemids").Length-1
			itemid =request.form.GetValues("itemids")(i)						
			if instr(session("shoppingcarts"), "itemid=" + itemid + "}")=0 then							
				session("shoppingcart") +=1						
				session("shoppingcarts")+=  "{" + session("shoppingcart").toString() + "itemid=" + itemid  + "}{itemname" + session("shoppingcart").toString() + "=" + request.form("itemname" + itemid) + "}{itemprice" + session("shoppingcart").toString() +"=" + request.form("itemprice" + itemid) + "}{itemqtty" + session("shoppingcart").toString() + "=" + request.form("itemqtty" + itemid)   + "}{itemlistprice" + session("shoppingcart").toString() + "=" + request.form("itemlistprice" + itemid)   + "}{itemstyle" + session("shoppingcart").toString() + "=" + request.form("itemstyle" + itemid)   + "}{itemproname" + session("shoppingcart").toString() + "=" + request.form("itemproname" + itemid)   + "}{itemweight" + session("shoppingcart").toString() + "=" + request.form("itemweight" + itemid)  + "}{itemauthorname" + session("shoppingcart").toString() + "=" + request.form("itemauthorname" + itemid)  + "}{itemdiscount" + session("shoppingcart").toString() + "=" + request.form("itemdiscount" + itemid)  + "}{itemavailable" + session("shoppingcart").toString() + "=" + request.form("itemavailable" + itemid)   + "}{itemimage" + session("shoppingcart").toString() + "=" + request.form("Image" + itemid) + "}"
			end if
		Next
	end if		
    End If	
End Sub
</script>

<HTML><HEAD><TITLE>InterShop-Online Shopping</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<META content=""  name=description>
<META content="trading software platform" name=keywords>
<META http-equiv=Pragma content=no-cache>
<LINK href="style.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript>
        	self.defaultStatus = "Online-Shopping!";                           
</SCRIPT>
</HEAD>
<BODY bottomMargin=0 leftMargin=0 topMargin=0  rightMargin=0 marginheight="0"  marginwidth="0">
<!--#include file="top.aspx"-->
<TABLE cellSpacing=0 cellPadding=0 border=0  width="775" >
  <TBODY> 
  <TR>
    <TD vAlign=top align="center"  width="160"> 
      <table width="18%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="center"><br> 
            <table border=0 cellspacing=0 cellpadding=0>
              <tr valign=bottom align=center> 
                <td><img src="images/browse-items.gif" width="155" height="19"></td>
              </tr>
              <tr valign=top align=center> 
                <td> 
                  <table border=0 width=155 cellpadding=1 cellspacing=0 bgcolor=#708090 >
                    <tr> 
                      <td width=100% height="49"> 
                        <table width=100% border=0 cellpadding=4 cellspacing=0 bgcolor=#FFFFFF>
                          <tr> 
                            <td valign=top width=8% align="left" height="51" bgcolor="#CAE2F0">
							 <!--#include file="includes/listsubcategories.htm"-->
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
            </table>
      </table>
      <!--#include file="left.aspx"-->
    </TD>
    <TD class=margin width="1" valign="top" align="right" bgcolor="#666666" > 
    </TD>
    <TD class=text_normal id=mainContent vAlign=top width="420"> 
      <TABLE cellSpacing=4 cellPadding=4 width="100%" align=left border=0 height="61">
        <TR> 
          <TD vAlign=top align=left height="46"> 
            <!--#include file="submenu.aspx"-->
             </TD>
        </TR>
        <TBODY> 
        <TR> 
          <TD vAlign=top align=middle height="165"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="22" valign="middle" align="center"> 
                  <h2> Item were added to your Shopping Cart:<br>
                  </h2>
                  <h2><a href="viewcart.aspx?sid=<%=session.sessionid()%>&<%=continue%>"><img src="images/view-to-cart.gif" border="0"></a> 
                    <a href="<%=file%>?<%=continue%>"><img src="images/cotinue.gif" width="87" height="19" border="0"></a> 
                  </h2>
                </td>
              </tr>
              <tr> 
                <td height="2" valign="top">&nbsp;</td>
              </tr>
	 <tr valign="middle"> 
                <td height="34"><b>Customers interested in <font color=red face="Arial" ></font> 
                  may also be interested in:</b></td>
              </tr>
             
              <tr valign="middle"> 
                <td height="13"> 
                  <hr noshade size="1" color=gray>
                </td>
              </tr>
              <tr valign="middle"> 
                <td valign=top> 
                  <%
					SQL="select top 10  ItemID as No, "
					SQL = SQL & "ItemName As Name, "
					SQL = SQL & "AuthorName As AuthorName,AuthID,SubCateID,"
					SQL = SQL & "ItemStyle,SalesPrice  "					
					SQL = SQL & "from vwItems where ItemID in ('" & replace(request.form("Relations"),",","','") &  "')"
					SQL = SQL & " Order by ItemName ASC"
					'response.write(SQL)					
					response.write(includeitems(SQL ,"details.aspx",2,"",continue))
					%>
                </td>
              </tr>
              <tr valign="middle"> 
                <td height="11"> 
                  <hr noshade size="1" color=gray>
                </td>
              </tr>
              <%
			  	SQL="select top 10  ItemID as No, "
				SQL = SQL & "ItemName As Name, "
				SQL = SQL & "AuthorName As AuthorName, AuthID,SubCateID,"
				SQL = SQL & "ItemStyle,SalesPrice "					
				SQL = SQL & "from vwItems where ItemID not in ('" & replace(request.form("itemids"),",","','")
				SQL = SQL & "') and  ItemID in "						
				SQL = SQL & " (select ItemID from vwOrderIDs "
				SQL = SQL & " where OrderID in (select OrderID "
				SQL = SQL & " from vwOrderIDs where ItemID not in ('"
				SQL = SQL &  replace(request.form("itemids"),",","','") & "')))"
				SQL = SQL & " order by CustomerRating ,ItemName ASC"
				'response.write(SQL)		
			     	strInterest=includeitems(SQL ,"details.aspx",2,"",continue)
			  	if strInterest<>"" then
			  %>
               <tr> 
                <td height="2" valign="top"><b>
	Customers who bought this book 
                  also bought:</b> </td>
              </tr>
              <tr> 
                <td  valign="top"> 
                  <%=strInterest%>
                </td>
              </tr>
              <tr valign="middle"> 
                <td height="12"> 
                  <hr noshade size="1" color=gray>
                </td>
              </tr>
              <%end if%>
            </table>
            
          </TD>
        </TR>
        </TBODY> 
      </TABLE>
    </TD>
    <TD class=margin width="1" valign="top" align="right" bgcolor="#666666" > 
    </TD>
    <TD class=margin valign="top" align="center" width="160"> 
      <TABLE width="150">
        <tr> 
          <td >&nbsp;</td>
          <td valign="top" align="center" >&nbsp;</td>
        </tr>
        <tr> 
          <td >&nbsp;</td>
          <td valign="top" align="center" > 
            <!--#include file="includes/right-cart.htm" -->
          </td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
          <td valign="top"><br>
            <table width="18%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td align="center"> 
                  <table border=0 cellspacing=0 cellpadding=0>
                    <tr valign=bottom align=center> 
                      <td><img src="images/new-products.gif" width="155" height="19"></td>
                    </tr>
                    <tr valign=top align=center> 
                      <td> 
                        <table border=0 width=155 cellpadding=1 cellspacing=0 bgcolor=#708090 >
                          <tr> 
                            <td width=100%> 
                              <table width=100% border=0 cellpadding=4 cellspacing=0 bgcolor=#FFFFFF>
                                <tr> 
                                  <td valign=top width=8% align="left" height="52"> 
                                    <p>&nbsp;</p>
                                  </td>
                                  <td valign=top width=92% align="left" height="52"> 
                                    <!--#include file="includes/right-top.htm" -->
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                  </table>
            </table>
          </td>
        </tr>
      </TABLE>
    </TD>
  </TR></TBODY></TABLE>
  <!--#include file="bottom.aspx"-->
</BODY></HTML>
